import { appPort } from "./config/appSetting.js";
import Koa from "koa";
import { usecontrollers } from "./controllers/index.js";
import { sync } from "./db/index.js";
import cors from '@koa/cors';


await sync()
let app = new Koa();


app.use(async (ctx,next) => {
    await next();
});

usecontrollers(app);
app.listen(appPort);


console.log(`http://localhost:${appPort}`);
